using System.Collections.Generic;
using System.IO;

namespace common
{
    public class FileHelper
    {
        public static void write_file(string filename, string content)
        {
            StreamWriter sw = new StreamWriter(filename, false);
            sw.Write(content);
            sw.Flush();
            sw.Close();
        }

        public static List<string> readSingleline(string strfile)
        {
            List<string> ss = new List<string>();

            StreamReader sr = new StreamReader(strfile);

            while (!sr.EndOfStream)
            {
                string s = sr.ReadLine().Trim();
                if (s.Trim() != "" && s.Trim().Substring(0, 1) != @"#")
                {
                    ss.Add(s);
                }
            }

            sr.Close();
            return ss;
        }
    }
}